<?php 
/**
 * TomatoCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version		$Id: details.phtml 5125 2010-08-30 04:05:28Z huuphuoc $
 * @since		2.0.0
 */
?>
<?php if ($this->article) : ?>
<?php
$this->headTitle($this->article->title);
?>
<div class="t_news_details">
	<h2><?php echo $this->article->title; ?></h2>
	
	<?php //if ($this->article->sub_title) : ?>
		<?php //echo $this->article->sub_title; ?>
	<?php //endif; ?>
	
	<cite><?php //echo $this->article->author; ?> <?php echo date($this->globalConfig('web')->datetime->format->datetime, strtotime($this->article->activate_date)); ?></cite>

	<div class="description"><?php echo $this->article->description; ?></div>
	
	<div class="content"><?php echo $this->article->content; ?></div>
        <?php if (!empty($this->article->attachment)): ?>
        <div class="attachments">
            <p class="attachments_title">
            <?php if (strstr('/', $this->article->attachment)) { 
                $name = explode('/', $this->article->attachment);
            }
            else {
                $name = explode('\\', $this->article->attachment);
            }

            $name = end($name);
            echo $this->translator('article_download_attachment'). ': ';	
            ?>
            </p>
            <p class="attachments_file"><a href="/download.php?file=<?php echo base64_encode($this->article->attachment); ?>"><?php echo $name; ?></a></p>
        </div>
        <?php endif; ?>
</div>
<?php endif; ?>
